/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projetointegrado;

import java.awt.Canvas;
import javax.swing.JPanel;

/**
 *
 * @author Emerson
 */
public class JanelaJogoMulti extends JPanel {
    KeyboardInput keyboard = new KeyboardInput();
    int largura = 1024;
    int altura = 550;
    Canvas canvas= new Canvas(); 
    MovementMulti mm = new MovementMulti(PainelMultiplayer.p,keyboard,largura,altura);
    
    public JanelaJogoMulti(){
        setIgnoreRepaint( true );
        setBounds(0,0,largura,altura);
       
        canvas.setIgnoreRepaint( true );
        canvas.setSize( largura, altura );
        add(canvas);
        addKeyListener(keyboard);
        canvas.addKeyListener(keyboard);
        System.out.println("ADDED KEYLISTENER");
    }
    
    public DesenhaTelaMulti criaDesenhaTela(){
        DesenhaTelaMulti dt = new DesenhaTelaMulti(this,canvas,largura,altura,keyboard,mm);
        dt.start();
        return dt;
    }
}
